<template>
  <div class="roam" :class="{ active: flag }">
    <div class="point">流转</div>
    <div class="info">
      <div class="item">
        <ul class="intro">
          <li>
            <span>操作人员</span>
            <p>{{ info.operaterName }}<template v-if="info.a0105">| {{ info.a0105 }}</template></p>
          </li>
          <li>
            <span>人员职务</span>
            <p>{{ info.e0102Name }}</p>
          </li>
        </ul>
        <div class="timer">{{ info.e0307 }}</div>
      </div>
      <div class="item">
        <ul class="intro">
          <li>
            <span>处置人员</span>
            <p>{{ info.e0311Name }}<template v-if="info.ba0105">| {{ info.ba0105 }}</template></p>
          </li>
        </ul>
        <div class="timer"></div>
      </div>
      <template v-if="info.reason">
        <div class="sub-title">流转原因</div>
        <div class="sub-desc">{{ info.e0315 }}</div>
      </template>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    info: {
      type: Object,
      default: () => {},
    },
    flag: {
      type: Boolean,
      default: true,
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
.roam {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-bottom: 20px;
  .point {
    flex: 0 0 auto;
    width: 52px;
    line-height: 20px;
    margin-right: 15px;
    padding: 4px 8px;
    background: #156abc;
    border-radius: 3px;
    color: #fff;
    text-align: center;
  }
  .info {
    flex: 1;
    padding: 5px 20px 15px;
    border: 1px solid #bebebe;
    background: #e2e5ef;

    .item {
      display: flex;
      align-items: center;
      margin-top: 15px;
      .intro {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        li {
          flex: 0 0 auto;
          min-width: 26.5%;
          height: 36px;
          display: flex;
          align-items: center;
          span {
            flex: 0 0 auto;
            width: 65px;
          }
          p {
            flex: 1;
            height: 36px;
            line-height: 34px;
            border: 1px solid #3e9fc8;
            padding: 0 8px;
            border-radius: 4px;
          }
        }
      }
      .timer {
        flex: 0 0 auto;
        width: 142px;
        text-align: right;
      }
    }
    .sub-title {
      padding: 10px 0;
    }
    .sub-desc {
      min-height: 56px;
      line-height: 24px;
      border: 1px solid #3e9fc8;
      padding: 3px 8px;
      border-radius: 4px;
    }
  }
  &.active {
    &:after {
      content: "";
      position: absolute;
      top: 28px;
      left: 23px;
      width: 2px;
      height: calc(100% - 28px);
      background: #c3c3c3;
    }
  }
}
</style>
